package com.wn.demo06;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author yellow Docter
 * @date 2024-07-25
 * @desc 蜗牛创想：www.woniuxy.com
 */
public class Demo22 {

    public static void main(String[] args) {

        //创建线程池
        ExecutorService service = Executors.newFixedThreadPool(4);
        for (int i = 0;i < 100;i++){
            service.submit(new Runnable() {
                @Override
                public void run() {
                    System.out.println("hello");
                }
            });
        }

    }

}
